package com.xc.pattern.chain;

/**
 * @author xingchen
 * @description 风控抽象类
 * @create 2022-09-06 20:18
 */
public abstract class RiskControlManager {

    protected String name;

    /**
     * 更严格的风控策略
     */
    protected RiskControlManager superior;

    public RiskControlManager(String name) {
        this.name = name;
    }

    /**
     * 设置更严格的风控策略
     *
     * @param superior
     */
    public void setSuperior(RiskControlManager superior) {
        this.superior = superior;
    }

    /**
     * 处理请求
     *
     * @param request
     */
    public abstract void handlerRequest(ChainRequest request);
}
